/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class Demo5 {
        public static boolean isFalse =false;
    public static void main(String[] args) throws InterruptedException {
//         boolean isFalse = false;
        Thread thread =new Thread(()->{
            while(!isFalse){
                System.out.println("thread 线程");
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            }

        });
        thread.start();
        Thread.sleep(3000);
        isFalse=true;
    }

}
